<template>
  <a-modal v-model="visible" width="700px" :footer="null" title="商品详情" @cancel="visible = false">
    <div class="details-wrapper">
      <img class="main-img" :src="productDetails.imgurl" alt="" v-if="productDetails" />
      <div class="text">
        <div class="t">款号：{{ productDetails.name }}</div>
        <div class="t">品名：{{ productDetails.value }}</div>
        <div class="t">年份：{{ productDetails.year }}</div>
        <div class="t">波段：{{ productDetails.band }}</div>
        <div class="t">品牌：{{ productDetails.brand }}</div>
        <div class="t">大类：{{ productDetails.bigClass }}</div>
        <div class="t">小类：{{ productDetails.smallClass }}</div>
      </div>
    </div>
  </a-modal>
</template>
<script>
export default {
  data() {
    return {
      productDetails: {},
      visible: false
    }
  },
  methods: {
    show(productDetails) {
      this.visible = true
      this.productDetails = productDetails
    }
  }
}
</script>
<style lang="less" scoped>
.details-wrapper {
  display: flex;
  padding-bottom: 40px;
  .main-img {
    display: block;
    width: 40%;
  }
  .text {
    flex: 1;
    margin-left: 10%;
    line-height: 35px;
    font-size: 14px;
  }
}
</style>

